package com.atguigu.mapreduce.outputformat;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class LogMapper extends Mapper<LongWritable, Text,Text, NullWritable> {
    @Override
    protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, NullWritable>.Context context) throws IOException, InterruptedException {
        //http://www.baidu.com 进入的数据，不实现统计，实现分区输出
        //包含atguigu的网站输出到e:/atguigu.log，不包含atguigu的网站输出到e:/other.log
        // map阶段不做统计，来一行写一行
        context.write(value,NullWritable.get());
    }
}
